#ifndef STU_DB_H
#define STU_DB_H
#endif // STU_DB_H

#include <mysql/mysql.h>
#include "mysql-utils.h"
#include "stu_record.h"

// 函数声明：从stu表中获取所有记录
int fetch_all_stu_records(MYSQL *conn, StuRecord **records, unsigned long *num_records);
// 函数声明：执行查询并返回StuRecord数组
int fetch_stu_records(MYSQL *conn, StuRecord **records, unsigned long *num_records);
// 可以添加更多针对stu表的操作，例如插入、更新、删除等
int insert_stu_record(MYSQL *conn, const StuRecord *record);
int update_stu_record(MYSQL *conn, const StuRecord *record);
int delete_stu_record(MYSQL *conn, int id);